package handler

import (
	"svvenus/conf"
	"svvenus/vgame/logic"
	"svvenus/znet"
	"svvenus/znet/zpb"
)

func CGItemInfoGet(request *znet.Request) {
	rsp := &zpb.ItemInfoList{}
	rid := zpb.EPid_GCItemInfoGet

	player := logic.ConnGetPlayer(request.GetConnection())
	if player == nil {
		request.Send(rid, conf.EProtocolResult玩家未登录, rsp)
		return
	}
	rsp = player.ItemInfoList()

	request.Send(rid, 0, rsp)
}
